package com.palmwindActivity.nav.local;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.GridView;

import com.palmwindActivity.R;
import com.palmwindActivity.nav.gallery.GalleryActivity;
import com.palmwindActivity.app.AbstractActivity;
import com.palmwindActivity.app.main.LocalThumbnailAdapter;

/**
 * 
 * @author albertma
 *
 */
public class LocalThumbnailActivity extends AbstractActivity implements View.OnClickListener {

	LocalThumbnailAdapter adapter;
	private int viewId;

	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		this.setContentView(R.layout.localgrid);
		GridView gridView = (GridView) findViewById(R.id.GridView);
		adapter = new LocalThumbnailAdapter(this);
		gridView.setAdapter(adapter);
		adapter.setOnClickListener(this);

	}

	protected void onStartDelegate() {

	}

	public void onClick(View v) {
		this.viewId = v.getId();
		Intent intent = new Intent(this, GalleryActivity.class);
		intent.putExtra("ViewId", viewId);
		startActivity(intent);
		 overridePendingTransition(R.anim.zoomin, 0);
	}
}
